<template>
<van-tabs v-model:active="active" color="#27ba9b" v-if="indexFlog <= 4 && indexFlog!=0">
  <van-tab v-for="(Items,index) in Goods[indexFlog]" :title="Items.title" :key="index">
    <div class="iot_HotBox">
        <GoodsCell 
        v-for="item in Items.goodsItems.items"
        :key="item.id" 
        :src="item.picture" 
        :id="item.id"
        :Name="item.name"
        :price="item.price"></GoodsCell>
    </div>
  </van-tab>
  <div class="iot_loading">正在加载……</div>
</van-tabs>
</template>

<script>
import { inject, ref } from 'vue';
import GoodsCell from './GoodsCell.vue';
export default {
    components:{
        GoodsCell
    },
    props:['indexFlog'],
  setup(props) {
    const active = ref(0)
    let Goods = inject('Goods') 
    return { active,Goods,props};
  },
};

</script>

<style >
.iot_potion{
    width: 100%;
    background: #aaa;
}
.iot_HotBox{
    display: flex;
    flex-wrap: wrap;
}
/* .options-start-active,.options-leave-active{
    transition: all .5s;
} */
</style>